% scrsz = get(0,'ScreenSize');
% figure('Position',[1 scrsz(1)/3 scrsz(3)/3 scrsz(4)/3])
figure(2)
set(gcf,'Color',[1,1,1]);



ml=csvread('ts.txt');

[x,y]=size(ml);
x = x -1;
for k=1:x
	u(k)=ml(k,4);
	v(k)=ml(k,3);
	w(k)=ml(k,5);

	  rectangle('Position',[u(k),v(k),w(k),.4],'EdgeColor','k')
    text(u(k)+w(k)/3 - 2 ,v(k) + .25 ,int2str(ml(k,1)),'FontSize', 8);
hold on;
end

[x,y] = size(ml);
x = ml(x,1);
line([x,x], [0, 1 + max(ml(:,3))],'Color','k');
text(x,2,'\leftarrow LB_{C_{max}}', 'FontName','Times', 'FontAngle','italic');


box on
xlabel('time (minute)');
ylabel('No. of machines');
set(gca,'YDir','reverse');
%xlim([0, 320]);

hold off